FileSystemPackageReader Constructor (string, ImpersonationBehavior)

Initializes a new instance of the FileSystemPackageReader class with the package that is stored in the specified file system path. Uses the specified identity to access files in the package.

Parent Type: FileSystemPackageReader

Namespace: Microsoft.LearningComponents

Assembly: Microsoft.LearningComponents.dll

Syntax
C#

public FileSystemPackageReader (
string packageBasePath,
ImpersonationBehavior impersonationBehavior

)

Parameters

packageBasePath

The path to the directory that is the base of the package, and contains the manifest for the package.

impersonationBehavior

The identity which has read access to the files in the located in packageBasePath.

Exceptions
Exception type Condition
ArgumentException

packageBasePath contains invalid characters such as ", <, >, or |.

SecurityException

The caller does not have the required permission.

PathTooLongException

The specified path exceeds the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. The specified path is too long.

ArgumentNullException

packageBasePath is a null reference.

Remarks

The package should be exploded (not in zip format) on the file system. Zipped packages can be read with the ZipPackageReader. Learning Resource packages can be read with the LrmPackageReader.

This constructor does not check if a directory exists. This constructor is a placeholder for a string that is used to access the disk in subsequent operations.

The packageBasePath parameter can be a directory on a network file share accessible via a mapped drive letter or UNC path.